﻿
Type.registerNamespace("Active");

Active.Calculate=function(times,unitprise,discount)
{
    this._times=times?times:0;
    this._unitprise=unitprise?unitprise:0;
    this._discount=discount?discount:0;
}

Active.Calculate.prototype={

    get_times:function()
    {
    return this._times;
    },
    set_times:function(value)
    {
    this._times=value;
    },

    get_unitprise:function()
    {
    return this._unitprise;
    },
    set_unitprise:function(value)
    {
    this._unitprise=value;
    },

    get_discount:function()
    {
    return this._discount;
    },
    set_discount:function(value)
    {
    this._discount=value;
    },
    getTotalInCome:function()
    {
    var total=this.get_times()*this.get_unitprise()*(1-this.get_discount()/100);
    return total;

    }
}

Active.Calculate.registerClass("Active.Calculate");

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();



